﻿@using Nop.Plugin.Api.Infrastructure
@model Nop.Plugin.Api.Areas.Admin.Models.ConfigurationModel

@{
    Layout = "_ConfigurePlugin";

    //page title
    //ViewBag.Title = T("Plugins.Api.Admin.Page.Settings.Title").Text;

    //active menu item (system name)
    //Html.SetActiveMenuItemSystemName("Api-Settings-Menu");
}

<form asp-controller="ApiAdmin" asp-action="Settings" method="post">
    @Html.AntiForgeryToken()

    <div class="content-header clearfix">
        <h1 class="pull-left">
            @T("Plugins.Api.Admin.Page.Settings.Title")
        </h1>
        <div class="pull-right">
            <button type="submit" name="save" class="btn bg-blue">
                <i class="fa fa-floppy-o"></i>
                @T("Admin.Common.Save")
            </button>
        </div>
    </div>

    <div class="content">
        <div class="form-horizontal">
            @await Component.InvokeAsync("StoreScopeConfiguration")
            @Html.ValidationSummary(false)
            <div class="panel-group">

                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="EnableApi_OverrideForStore" asp-input="EnableApi" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="EnableApi" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="EnableApi" />
                                <span asp-validation-for="EnableApi"></span>
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="TokenExpiryInDays_OverrideForStore" asp-input="TokenExpiryInDays" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="TokenExpiryInDays" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="TokenExpiryInDays" />
                                <span asp-validation-for="TokenExpiryInDays"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
